// 2013-7-29下午02:21:54  net.betou.trade.main.dao.CategoryDao.java

package net.betou.trade.main.dao;

import java.util.List;

import net.betou.common.hibernate3.Updater;
import net.betou.common.page.Pagination;
import net.betou.trade.entity.main.Category;

/**
 * 品种管理
 * @author 叶装装
 */
public interface CategoryDao{
	
	// 获取数据
	public Pagination getPage( Integer selfId, String searchProperty, String searchValue, String orderProperty, String orderDirection, int pageNo, int pageSize );
	
	public Pagination getPage( Integer selfId, String term, String orderProperty, String orderDirection, int pageNo, int pageSize );
	
	public Pagination getPageByCriteria( String sql, String orderProperty, String orderDirection, int pageNo, int pageSize );
	
	public Pagination getPageByCriteria( String searchProperty, String searchValue, String orderProperty, String orderDirection, int pageNo, int pageSize, String sql );
	
	public Category findMyCategory( Integer id, Integer selfId );
	
	public List< Category > findListByName( String name );
	
	public Category findById( Integer id );
	
	public int countByName( String name );
	
	// 增删改
	public Category save( Category bean );
	
	public Category deleteById( Integer id );
	
	public Category updateByUpdater( Updater< Category > updater );
	
	public Category findByName( String name );
	
	

}
